package org.example.controller;

import lombok.RequiredArgsConstructor;
import org.example.domain.ResponseResult;
import org.example.service.UserRoleService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/userRole")
@RequiredArgsConstructor
public class UserRoleController {

    private final UserRoleService userRoleService;


    @GetMapping("/getRoleIdByUserId/{id}")
    public ResponseResult getRoleIdByUserId(@PathVariable Integer id){

        return userRoleService.getRoleIdByUserId(id);
    }

}
